import { NgModule } from '@angular/core';
import { HTTP_INTERCEPTORS, HttpClientModule } from "@angular/common/http";
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
import { HashLocationStrategy, LocationStrategy } from "@angular/common";
import { ReactiveFormsModule } from "@angular/forms";
import { StompConfig, StompService } from '@stomp/ng2-stompjs';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import { AppRoutingModule } from "./app.routing.module";
import { UnsaveGuard } from "./pubcomponent/UnsaveGuard";
import { PermissionGuard } from "./pubcomponent/PermissionGuard";
import { MyhttpInterceptorService } from "./myhttpInterceptor.service";
import { MypreloadService } from "./mypreload.service";

@NgModule({
  imports: [
    BrowserModule,
    ReactiveFormsModule,
    BrowserAnimationsModule,
    HttpClientModule,
    AppRoutingModule,
  ],
  declarations: [
    AppComponent

  ],
  providers: [
    // {provide: APP_BASE_HREF, useValue: '/platform'},
    { provide: LocationStrategy, useClass: HashLocationStrategy },
    // StompService,
    // {provide: StompConfig, useValue: stompConfig},
    { provide: HTTP_INTERCEPTORS, useClass: MyhttpInterceptorService, multi: true },
    UnsaveGuard,
    PermissionGuard,
    MypreloadService],
  bootstrap: [AppComponent]
})
export class AppModule {

}
